package com.easwift.qsp.enums;

/**
 * 设备类型枚举
 *
 * @author Administrator
 *
 */
public enum DeviceTypeEnum {

	DVW16(1, "dvw16"),

	LASER(2, "激光测距仪"),

	EXPLORER(3, "电压采集仪"),

	WATER(4, "静力水准仪"),
	JGXGY(5, "激光超高检测仪");

	private int code;

	private String name;

	private DeviceTypeEnum(int code, String name) {
		this.code = code;
		this.name = name;
	}

	public int getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

	public static String getNameByCode(int code) {
		for (DeviceTypeEnum type : DeviceTypeEnum.values()) {
			if (type.getCode() == code) {
				return type.getName();
			}
		}
		return null;
	}

}
